Skip to content

docs(buttons): add selection buttons composition variants#1561

Open
dauriamarco wants to merge 1 commit into
mainfrom
docs/selection-buttons/template-variants
Open

docs(buttons): add selection buttons composition variants#1561
dauriamarco wants to merge 1 commit into
mainfrom
docs/selection-buttons/template-variants

Conversation

@dauriamarco

Copy link
Copy Markdown
Member

Resolves #941

Describe in detail what your merge request does and why. Add relevant
screenshots and reference related issues via Closes #XY or Related to #XY.


@dauriamarco dauriamarco added this to the 49.x milestone Feb 23, 2026
@dauriamarco dauriamarco self-assigned this Feb 23, 2026
@dauriamarco
dauriamarco requested review from a team as code owners February 23, 2026 11:23

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds documentation for different composition variants of selection buttons and refactors the corresponding examples. The changes in the examples correctly simplify the HTML structure by removing unnecessary <span> elements. The new documentation is helpful, but the code example for the 'Input wrapped inside label' variant contains an error: the radio buttons are missing the name attribute, which is necessary for them to function correctly as a group. I've added a suggestion to fix this.

Comment thread docs/components/buttons-menus/button-group.md
@github-actions

Copy link
Copy Markdown

@dauriamarco
dauriamarco force-pushed the docs/selection-buttons/template-variants branch from 71e4a72 to 4e856ba Compare February 23, 2026 11:41
@github-actions

Copy link
Copy Markdown

Code Coverage

Comment on lines +230 to +234
<label>
<input type="checkbox" class="btn-check" aria-label="One pane" siTooltip="One pane" checked />
<si-icon class="btn btn-icon icon" icon="element-layout-pane-1" />
</label>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still unsure, what we should recommend to projects here.

I guess wrapping it in a label is the way nicer approach, and as written in the other PR, maybe maybe moving the btn btn-icon classes to the label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve documentation for selection-buttons (old name segmented-buttons)

2 participants